(function () {
    "use strict";

    // shallow copy
    /*
    function deepCopy(objectToCopy) {
        return JSON.parse(JSON.stringify(objectToCopy));
    }

    var sampleObj = {
        sampleFirstProp: 'string',
        sampleFirstObjProp: {
            propOne: 5,
            propTwo: 'c'
        }
    };

    var copy = deepCopy(sampleObj);

    console.log(copy);
    console.log(sampleObj);
    */

    function deepCopy(objectToCopy)
    {
        var result = {};

        for (var prop in objectToCopy) {
            result[prop] = objectToCopy[prop];
        }

        return result;
    }

    var sampleObj = {
        sampleFirstProp: 'string',
        sampleFirstObjProp: {
            propOne: 5,
            propTwo: 'c'
        }
    };

    var newObj = deepCopy(sampleObj);

    console.log(newObj);
    console.log(sampleObj);
}());